﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Tibet.Logica;

namespace Tibet.GUI.Vista
{
    public partial class ModificarCliente : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            Cliente micliente = new Cliente();

            //BusquedaCliente da error, revisar metodo Cliente.BusquedaCliente 
            //GridView1.DataSource = micliente.BusquedaCliente(this.buscarNombreCliente.Text);

            GridView1.DataBind();
        }

        protected void TaskGridView_RowEditing(object sender, GridViewEditEventArgs e)
        {
            this.nombreCliente.Text = GridView1.Rows[e.NewEditIndex].Cells[2].Text;
            
        }
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        protected void nombreCliente_TextChanged(object sender, EventArgs e)
        {

        }

        protected void botonCrear_Click(object sender, EventArgs e)
        {
            if (!this.logoCliente.FileName.Equals("")) 
            {
                String script = @"<script language = ""JavaScript""> alert('Cliente Modificado con Exito'); </script>";
                this.RegisterStartupScript("alerta", script);
                this.nombreCliente.Text = "";
            }
        }
    }
}